<admintpl file="header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:U('Banners/index')}">轮播图列表</a></li>
			<li><a href="{:U('Banners/add')}">添加轮播图</a></li>
		</ul>
		<form class="well form-search" method="post" action="{:U('Banners/index')}">
			分类名称:
			<input type="text" name="banner_type" style="width: 130px;" value="{:I('request.banner_type/s','')}" placeholder="请输入分类名称">
			<input type="submit" class="btn btn-primary" value="搜索" />
			<a class="btn btn-danger" href="{:U('Banners/index')}">清空</a>
		</form>
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<th width="50">ID</th>
					<th>分类名称</th>
					<th>缩略图</th>
					<th>跳转链接</th>
					<th width="50">{:L('STATUS')}</th>
					<th width="100">{:L('ACTIONS')}</th>
				</tr>
			</thead>
			<style>td{word-break:break-all;}</style>
			<tbody>
				<php>
					$banners_statuses=array("0"=>禁用,"1"=>启用);
					$banner_type=array("index"=>"首页轮播图","shop_discount"=>"店铺优惠轮播图","welfare"=>"会员福利轮播图");
				</php>
				<foreach name="list" item="vo">
				<tr>
					<td>{$vo.id}</td>
					<td>{$banner_type[$vo['banner_type']]}</td>
					<td><a href="<php>echo '/'.C('UPLOADPATH').$vo['banner_img']</php>" target="_blank">点击查看</a></td>
					<td>{$vo.banner_url}</td>
					<td>{$banners_statuses[$vo['use_flg']]}</td>
					<td>
						<a href='{:U("Banners/edit",array("id"=>$vo["id"]))}'>{:L('EDIT')}</a> |
						<a class="js-ajax-delete" href="{:U('Banners/delete',array('id'=>$vo['id']))}">{:L('DELETE')}</a>
					</td>
				</tr>
				</foreach>
			</tbody>
		</table>
		<div class="pagination">{$page}</div>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>